<template>
  <!--  门特待遇人群类型对比表-->
  <my-charts id="special-treatment-person" :options="chartOption" width="100%" height="90%" />
</template>

<script>
import MyCharts from '@/components/MyCharts/index'
import { toolbox } from '@/components/MyCharts/toolbox'
export default {
  name: 'SpecialTreatmentPerson',
  mixin: [],
  components: {
    'my-charts': MyCharts
  },
  props: {
    axisData: {
      type: Array,
      default: () => []
    },
    seriesData: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {}
  },
  computed: {
    chartOption: function() {
      return {
        color: ['#3398DB'],
        tooltip: {
          trigeger: 'axis',
          axisPointer: {
            type: 'shadow'
          }
        },
        grid: { left: '3%', right: '7%', bottom: '3%', top: '6%', containLabel: true },
        toolbox: toolbox('单位'),
        xAxis: {
          type: 'category',
          data: this.axisData,
          axisTick: {
            alignWithLabel: true
          },
          axisLine: {
            lineStyle: {
              color: '#000000'
            }
          }
        },
        yAxis: {
          type: 'value'
        },
        series: [
          {
            name: '人数',
            data: this.seriesData,
            type: 'bar',
            barWidth: '70%',
            markLine: {
              data: [
                { name: '平均值',
                  type: 'average'
                }
              ],
              itemStyle: {
                normal: {
                  lineStyle: {
                    type: 'dashed'
                  }
                }
              }
            }
          }
        ]
      }
    }
  },
  watch: {},
  created() {
  },
  mounted() {
  },
  methods: {}
}
</script>

<style scoped lang="scss"></style>
